{% extends "base.html" %}
{% block title %}Crontab Add{% endblock %}
{% block content %}
<!--atsystem-->
                <!--/span-->
                <div  class="span9" id="content">
                      <!-- morris stacked chart -->



                    <div class="row-fluid">
                                <div class="navbar">
                                <div class="navbar-inner">
                                        <ul class="breadcrumb">
                                            <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide 
Sidebar" rel='tooltip'>&nbsp;</a></i>
                                            <i class="icon-chevron-right show-sidebar" style="display:none;"><
a href='#' title="Show Sidebar" rel='tooltip'>&nbsp;</a></i>
                                            <li>
                                                <a href="/admin/">Dashboard</a> <span class="divider">/</span>
                                            </li>
                                            <li>
                                                <a href="/admin/tasks/">Tasks</a> <span class="divider">/</span>
                                            </li>
                                            <li>
                                                <a href="/admin/tasks/crontab_add/">crontab_add</a> <span class="div
ider">/</span>
                                            </li>


                                        </ul>
                                </div>
                                </div>
                        </div>




			<div class="row-fluid">
                         <!-- block -->
                        <div class="block">
                            <div class="navbar navbar-inner block-header">
                                <div id="idusername" value="" class="muted pull-left"><b> Add Crontab</b></div>
                            </div>
                            <div class="block-content collapse in">
                                <div class="span12">
                                        <!-- BEGIN FORM-->
                                        <form action="#" id="form_sample_1" class="form-horizontal">
                                                <fieldset>
                                                        <div class="alert alert-error hide">
                                                                <button class="close" data-dismiss="alert"></button>
                                                                You have some form errors. Please check below.
                                                        </div>
                                                        <div class="alert alert-success hide">
                                                                <button class="close" data-dismiss="alert"></button>
                                                                Your form validation is successful!
                                                        </div>
                                                        <div class="control-group">
                                                                <label class="control-label"><b>Minute:</b><span class="required">*</span></label>
                                                                <div class="controls">
                                                                        <input type="text" id="minute" data-required="1" class="input-mini focused"   value="*"/>
                                                                </div>
                                                        </div>

                                                        <div class="control-group">
                                                                <label class="control-label"><b>Hour:</b><span class="required">*</span></label>
                                                                <div class="controls">
                                                                        <input type="text" id="hour" data-required="1" class="input-mini focused"   value="*"/>
                                                                </div>
                                                        </div>




                                                        <div class="control-group">
                                                                <label class="control-label"><b>Day of week:</b><span class="required">*</span></label>
                                                                <div class="controls">
                                                                        <input type="text" id="dweek" data-required="1" class="input-mini focused"   value="*"/>
                                                                </div>
                                                        </div>



                                                        <div class="control-group">
                                                                <label class="control-label"><b>Day of mouth:</b><span class="required">*</span></label>
                                                                <div class="controls">
                                                                        <input type="text" id="dmouth" data-required="1" class="input-mini focused"   value="*"/>
                                                                </div>
                                                        </div>



                                                        <div class="control-group">
                                                                <label class="control-label"><b>Mouth of year:</b><span class="required">*</span></label>
                                                                <div class="controls">
                                                                        <input type="text" id="myear" data-required="1" class="input-mini focused"   value="*"/>
                                                                </div>
                                                        </div>










                                                        <div class="form-actions">
                                                                <button type="button" onclick="cronadd()" class="btn btn-primary"> Add </button>
                                                                <button  onclick="javascript:history.go(-1);" type="button" class="btn">Cancel</button>
                                                        </div>
                                                </fieldset>
                                        </form>
                                        <!-- END FORM-->
                                </div>
                            </div>
                        </div>


                        <!-- /block -->
                    </div>
</div>


                     <!-- validation -->
            </div>

<script "text/javascript">

function cronadd(){
var minute=$("#minute").val();
var hour=$("#hour").val();
var dweek=$("#dweek").val();
var dmouth=$("#dmouth").val();
var myear=$("#myear").val();

var cronarray=new Array();
cronarray.push(minute);
cronarray.push(hour);
cronarray.push(dweek);
cronarray.push(dmouth);
cronarray.push(myear);

//alert(cronarray);
//}
$.post('/admin/tasks/crontab_add/',
{
'crondata':JSON.stringify(cronarray)
},

function(data){
alert(data);
});

}

</script>

{% endblock %}



